#ifndef __GRAPHIC_PARTICLE_TABLE__
    #define __GRAPHIC_PARTICLE_TABLE__

    // .. REFERENCES

	#include "array.h"
	#include "table.h"
    #include "math_vector_2.h"
    #include "math_vector_3.h"
	#include "color.h"
	#include "primitives.h"

    // .. CONSTANTS

    #define LOCAL_FixedParticleCount    64

    // .. TYPES

    class GRAPHIC_PARTICLE_TABLE :
        public OBJECT
    {
        // -- PUBLIC

    public :

        // .. TYPES

        struct FIXED_PARTICLE_TABLE
        {
            TABLE< MATH_VECTOR_3, LOCAL_FixedParticleCount >
                Position;
            TABLE< MATH_VECTOR_2, LOCAL_FixedParticleCount >
                Extent;
            //TABLE< COLOR, LOCAL_FixedParticleCount >
            //    Color;
            TABLE< MATH_VECTOR_3, LOCAL_FixedParticleCount >
                Velocity;
            TABLE< BOOL, LOCAL_FixedParticleCount >
                Enabled;
            TABLE< REAL , LOCAL_FixedParticleCount >
                LifeTime;
            TABLE< REAL , LOCAL_FixedParticleCount >
                Spin;
            TABLE< REAL , LOCAL_FixedParticleCount >
                Angle;
        };

        // .. CONSTRUCTORS

        GRAPHIC_PARTICLE_TABLE();

        // .. ACCESSORS

        COUNT GetParticleCount() const
        {
            return ParticleCount;
        }

        // ~~

        const ARRAY< FIXED_PARTICLE_TABLE > & GetParticleTable() const
        {
            return ParticleTable;
        }

        // ~~

        ARRAY< FIXED_PARTICLE_TABLE > & GetParticleTable()
        {
            return ParticleTable;
        }

        // .. OPERATIONS

        VOID Initialize(
            const COUNT particle_count
            );

        // ~~

        VOID Reset();

        // .. VARIABLES

        static const COUNT
            FixedParticleCount = LOCAL_FixedParticleCount;

        // -- PRIVATE

    private :

        // .. ATTRIBUTES

        ARRAY< FIXED_PARTICLE_TABLE >
            ParticleTable;
        COUNT
            ParticleCount;
    };
#endif
